﻿using System;

namespace WikiBugtracker.Settings
{
    public class MySettingsManager : Common.SettingsManager
    {
        private string param_folder_ = "FOLDER";
        private string param_username_ = "USERNAME";
        private string param_fullname_ = "FULLNAME";


        public MySettingsManager()
            : base()
        {
            Add(param_folder_);
            Add(param_username_);
            Add(param_fullname_);
        }

        public MySettingsManager(String parameters)
            : this()
        {
            Set(parameters);
        }

        public String ParamFolder
        {
            get { return param_folder_; }
        }

        public String Folder
        {
            get
            {
                String result = this[param_folder_];

                if (!result.EndsWith("\\"))
                {
                    result += "\\";
                }

                return result;
            }

            set { this[param_folder_] = value; }
        }

        public String Username
        {
            get { return this[param_username_]; }
            set { this[param_username_] = value; }
        }

        public String FullName
        {
            get { return this[param_fullname_]; }
            set { this[param_fullname_] = value; }
        }
    }
}